﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WFBot.Framework.Repositories;
using WFBot.Framework.Domain;
using WFBot.Framework.Infrastructure;

namespace WFBot.Framework.Services
{
    public class OperatorService : IOperatorService
    {
        private readonly IUnitOfWork _unitOfWork;
        private readonly IOperatorRepository _operatorRepository;

        public OperatorService(IUnitOfWork unitOfWork, IOperatorRepository operatorRepository)
        {
            _unitOfWork = unitOfWork;
            _operatorRepository = operatorRepository;
        }

        public void UpdateCurrentChannel(Operator op, string channel)
        {
            op.CurrentChannel = channel;
            _unitOfWork.Commit();
        }
    }
}
